package com.region.http.client.resolver.result;

import com.region.http.client.model.ResponseData;

import java.lang.reflect.Type;

/**
 * @author 26225
 * @date 2024/7/7 15:54
 * @description
 */
public class MyResultResolver implements ResultResolver {

    @Override
    public int getPriority() {
        return 0;
    }

    @Override
    public boolean isResolver(Type type) {
        return true;
    }

    @Override
    public Object resolver(ResponseData responseData) throws Throwable {
        System.out.println(responseData.getHeaders());
        System.out.println(responseData.getNameValuePairs());
        return new String(responseData.getBody());
    }
}
